-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
afc/ward decomposition for embedded HVDC #64
base: main
Are you sure you want to change the base?
Conversation
ybus::Ybus{Tuple{Vector{Int64}, Vector{Int64}}, Tuple{Dict{Int64, Int64}, Dict{Int64, Int64}}}, | ||
study_buses::Vector{Int64} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
ybus::Ybus{Tuple{Vector{Int64}, Vector{Int64}}, Tuple{Dict{Int64, Int64}, Dict{Int64, Int64}}}, | |
study_buses::Vector{Int64} | |
ybus::Ybus{ | |
Tuple{Vector{Int64}, Vector{Int64}}, | |
Tuple{Dict{Int64, Int64}, Dict{Int64, Int64}}, | |
}, | |
study_buses::Vector{Int64}, |
select_x = [ybus.lookup[1][i] for i in study_buses]; | ||
select_y = [ybus.lookup[2][i] for i in study_buses]; | ||
unselect_x = [ybus.lookup[1][i] for i in keys(ybus.lookup[1]) if i ∉ study_buses]; | ||
unselect_y = [ybus.lookup[2][i] for i in keys(ybus.lookup[1]) if i ∉ study_buses]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
select_x = [ybus.lookup[1][i] for i in study_buses]; | |
select_y = [ybus.lookup[2][i] for i in study_buses]; | |
unselect_x = [ybus.lookup[1][i] for i in keys(ybus.lookup[1]) if i ∉ study_buses]; | |
unselect_y = [ybus.lookup[2][i] for i in keys(ybus.lookup[1]) if i ∉ study_buses]; | |
select_x = [ybus.lookup[1][i] for i in study_buses] | |
select_y = [ybus.lookup[2][i] for i in study_buses] | |
unselect_x = [ybus.lookup[1][i] for i in keys(ybus.lookup[1]) if i ∉ study_buses] | |
unselect_y = [ybus.lookup[2][i] for i in keys(ybus.lookup[1]) if i ∉ study_buses] |
Y_se = ybus.data[select_x, unselect_y]; | ||
Y_es = ybus.data[unselect_x, select_y]; | ||
Y_ee = ybus.data[unselect_x, unselect_y]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
Y_se = ybus.data[select_x, unselect_y]; | |
Y_es = ybus.data[unselect_x, select_y]; | |
Y_ee = ybus.data[unselect_x, unselect_y]; | |
Y_se = ybus.data[select_x, unselect_y] | |
Y_es = ybus.data[unselect_x, select_y] | |
Y_ee = ybus.data[unselect_x, unselect_y] |
src/ward_calculations.jl
Outdated
A = Y_se*KLU.solve!(KLU.klu(Y_ee), Matrix(Y_es)); | ||
B = KLU.solve!(KLU.klu(Y_ee), Matrix(transpose(Y_se))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
A = Y_se*KLU.solve!(KLU.klu(Y_ee), Matrix(Y_es)); | |
B = KLU.solve!(KLU.klu(Y_ee), Matrix(transpose(Y_se))); | |
A = Y_se * KLU.solve!(KLU.klu(Y_ee), Matrix(Y_es)) | |
B = KLU.solve!(KLU.klu(Y_ee), Matrix(transpose(Y_se))) |
return Ward_data( | ||
A, | ||
B, | ||
study_buses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
study_buses | |
study_buses, |
B, | ||
study_buses | ||
) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
end | |
end |
Performance Results
|
|
||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
end | |
end |
A = -Y_se*KLU.solve!(KLU.klu(Y_ee), Matrix(Y_es)); | ||
B = KLU.solve!(KLU.klu(Y_ee), Matrix(transpose(Y_se))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
A = -Y_se*KLU.solve!(KLU.klu(Y_ee), Matrix(Y_es)); | |
B = KLU.solve!(KLU.klu(Y_ee), Matrix(transpose(Y_se))); | |
A = -Y_se * KLU.solve!(KLU.klu(Y_ee), Matrix(Y_es)) | |
B = KLU.solve!(KLU.klu(Y_ee), Matrix(transpose(Y_se))) |
hvdc_line = PSY.get_component(PSY.TwoTerminalHVDCLine, sys, "DC1"); | ||
study_buses = [ | ||
PSY.get_from(PSY.get_arc(hvdc_line)), | ||
PSY.get_to(PSY.get_arc(hvdc_line)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
PSY.get_to(PSY.get_arc(hvdc_line)) | |
PSY.get_to(PSY.get_arc(hvdc_line)), |
|
||
# ! angles are different after computation | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
Thanks for opening a PR to PowerNetworkMatrices.jl, please take note of the following when making a PR:
Check the contributor guidelines